package com.tianji.promotion.controller;


import com.tianji.common.domain.dto.PageDTO;
import com.tianji.promotion.domain.po.ExchangeCode;
import com.tianji.promotion.domain.query.CodeQuery;
import com.tianji.promotion.service.IExchangeCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 兑换码 前端控制器
 * </p>
 *
 * @author zhongweiwei
 * @since 2023-06-03
 */
@RestController
@RequestMapping("/codes")
@Api("兑换码相关接口")
@RequiredArgsConstructor
public class ExchangeCodeController {
    private final IExchangeCodeService exchangeCodeService;

    @GetMapping("page")
    @ApiOperation("分页条件查询兑换码")
    public PageDTO<ExchangeCode> queryPageCode(CodeQuery query) {
        return exchangeCodeService.queryPageCode(query);
    }


}
